<%@ page language="java" contentType="text/html;charset=utf-8" pageEncoding="utf-8" %>
<!DOCTYPE HTML>
<html>

<head>
    <title>密码修改</title>
</head>
<body>
<style>
    form div {
        white-space: nowrap;
    }
</style>
<div class="pd-10">
    <div >
        <form id='registerform'action="<%=request.getContextPath()%>/back/user/passwordedit.do" method="post" class="form form-horizontal">
            <input type="hidden" id="unid"name="unid" />
            <div class="row cl">
                <label class="form-label col-3"><span class="c-red">*</span>旧密码：</label>
                <div class="formControls col-5 inline">
                    <input type="text" class="input-text" id="oldpassword" name="oldpassword" datatype= "/^[0-9A-Za-z]{4,12}$/" errormsg="请填写4-12位数字或英文" >
                </div>
            </div>
            <div class="row cl">
                <label class="form-label col-3"><span class="c-red">*</span>新密码：</label>
                <div class="formControls col-5 inline">
                    <input type="text" class="input-text" id="newpassword" name="newpassword" datatype= "/^[0-9A-Za-z]{4,12}$/" errormsg="请填写4-12位数字或英文" >
                </div>
            </div>
            <div class="row cl" style="margin-top:25px">
                <div class="col-9 col-offset-3">
                    <button class="btn btn-primary radius" id="submitBtn"> 确定</button>&nbsp;&nbsp;&nbsp;
                    <button class="btn  radius" type='reset'> 重置</button>&nbsp;&nbsp;&nbsp;
                </div>
            </div>
        </form>
    </div>
</div>

</body>
</html>
<%@include file="../../head-ui.jsp" %>
<script type="text/javascript">


    $(function () {

        $('.skin-minimal input').iCheck({
            checkboxClass: 'icheckbox-blue',
            radioClass: 'iradio-blue',
            increaseArea: '20%'
        });
        $("#unid").val('${user.unid}');

        var form = $("#registerform").Validform({
            tiptype: 3,
            callback: function (data) {

                if (data.status == "true") {
                    layer.alert('修改成功!', {
                        icon: 1,//2表示保存失败图标，1表示保存成功
                        closeBtn: false,
                        shadeClose: true,
                        title: "提示"
                    }, function () {
                        layer_close();
                    });
                } else {
                    layer.msg('修改失败!', {icon: 1, time: 1000});
                }
            },
            ajaxPost: true,
            showAllError: true

        });

        $("#submitBtn").click(function () {
            form.submitForm(false);
        })
    })
</script>

